/**
 * 文件描述：基本的 Servlet
 * 创建人： SPGLP55
 * 创建时间：2024/10/31
 * 最后编辑人：SPGLP55
 * 最后编辑时间：2024/11/3
 * 文件版本：3
 */

package com.gxuwz.lhleavesys.web.servlet;

import java.io.IOException;

import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpServlet;

public class BaseLHServlet extends HttpServlet {
    
    /**
     * 转发器
     * @param req
     * @param res
     * @param path
     * @throws ServletException
     * @throws IOException
     */
    protected void doDispatch(HttpServletRequest req, HttpServletResponse res, String path) throws ServletException,IOException{
        RequestDispatcher dispatcher = req.getRequestDispatcher(path);
        dispatcher.forward(req, res);
    }

    /**
     * 重定向器
     * @param req
     * @param resp
     * @param location
     * @throws ServletException
     * @throws IOException
     */
    protected void doRedirect(HttpServletRequest req, HttpServletResponse resp,String location)throws ServletException,IOException{
        resp.sendRedirect(location);
    }
    
}
